package cn.tedu.properties;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

public class PropertiesDemo1 {
    public static void main(String[] args) throws IOException {
        //创建映射类的对象
        Properties p=new Properties();
        //添加元素
        p.setProperty("姓名","赵四");
        p.setProperty("年龄","40");
        p.setProperty("性别","男");

        //支持持久化
        p.store(new FileOutputStream
                ("person.properties"),"俺们屯里的人!!!");
    }
}
